var UserSQL = {
    user:{
        insert: 'INSERT INTO User(uid,userName) VALUES(?,?)',
        queryAll: 'SELECT * FROM User',
        queryLogin: 'SELECT * FROM cl_user WHERE username=? and password=?',
        getUserById: 'SELECT * FROM cl_user WHERE uid = ? ',
    },

    home:{
        queryBanner: 'SELECT * FROM cl_banner',
        queryCateList:'SELECT id,name,href,pic FROM cl_cate ',
        querynews:'SELECT id,title,up_time FROM cl_article WHERE type="news" ORDER BY click DESC',
        insertArticle:'INSERT INTO cl_article(id,author,title,type,`desc`,content,click,reply) VALUES(?,?,?,?,?,?,?,?)',
    },
    
    forum:{
    	//queryHotart:'SELECT id,title,type,up_time,desc,pic,up_time,click,reply FROM cl_article WHERE type= ? ',
        queryHotart:'SELECT id,title,up_time,"desc",pic,up_time,click,reply FROM cl_article WHERE type=? ORDER BY click DESC LIMIT ?',
        queryArticle:'SELECT id,title,up_time,"desc",pic,up_time,click,reply FROM cl_article WHERE type=? LIMIT ?,?',
        queryArticleCount:'SELECT COUNT(type) FROM cl_article WHERE type=?',
        queryArtInfo:'SELECT id,title,content,up_time FROM cl_article WHERE id=?',
        queryReply:'SELECT reply_content,reply_person_id,reply_time,reply_pic,id FROM cl_reply WHERE article_id=?',
    }

};


module.exports = UserSQL;